﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using EVM.Implementation;
using Wicresoft.Logger;

namespace Wicresoft.Task.EmployeeSync
{
    public class GetAllUsersTask : Wicresoft.Task.Common.IntervalTask
    {
        protected override void Execute()
        {
            var xml = new Business().GenerateAllUserACI();
            var path = Path.Combine(Bag.SyncPath, DateTime.Now.ToString("yyyyMMdd") + ".xml");

            File.WriteAllText(path, xml, Encoding.UTF8);

            Log.Info(Name, "Put all user info into ({0})", path);
        }
    }
}
